package com.designpattern.demo.design3;

/**
 * Created by lingchen on 2019/11/27. 22:34
 * mail:lingchen52@foxmail.com
 */
public abstract class Decorator extends Component {

    private Component mComponent;

    public void setComponent(Component component) {
        this.mComponent = component;
    }

    @Override
    public void Opeartion() {
        if (mComponent != null) {
            mComponent.Opeartion();
        }
    }
}
